package com.yanqu.road.entity.player;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.math.BigInteger;
import java.util.Objects;

@FieldTypeAnnotation(tableName = "t_u_patrons_contract", desc = "门客契约")
public class UserPatronsContract extends DataObject {

	@FieldTypeAnnotation(select = true, update = true)
	private long userId;
	@FieldTypeAnnotation(update = true)
	private int patronsId;
	@FieldTypeAnnotation(update = true, desc = "槽位位置")
	private int pos;
	@FieldTypeAnnotation(desc = "契约的美女")
	private int beautyId;
	@FieldTypeAnnotation(desc = "契约的赚钱")
	private BigInteger abilityAdd = BigInteger.ZERO;
	@FieldTypeAnnotation(desc = "契约的时间")
	private long contractTime;

	public UserPatronsContract(long userId, int patronsId, int pos) {
		this.userId = userId;
		this.patronsId = patronsId;
		this.pos = pos;
		setInsertOption();
	}

	public UserPatronsContract() {
	}

	public long getUserId() {
		return userId;
	}

	public void setUserId(long userId) {
		this.userId = userId;
	}

	public int getPatronsId() {
		return patronsId;
	}

	public void setPatronsId(int patronsId) {
		this.patronsId = patronsId;
	}

	public int getPos() {
		return pos;
	}

	public void setPos(int pos) {
		this.pos = pos;
	}

	public int getBeautyId() {
		return beautyId;
	}

	public void setBeautyId(int beautyId) {
		if (this.beautyId != beautyId) {
			this.beautyId = beautyId;
			setUpdateOption();
		}
	}

	public BigInteger getAbilityAdd() {
		return abilityAdd;
	}

	public void setAbilityAdd(BigInteger abilityAdd) {
		if (this.abilityAdd.compareTo(abilityAdd) != 0) {
			this.abilityAdd = abilityAdd;
			setUpdateOption();
		}
	}

	public long getContractTime() {
		return contractTime;
	}

	public void setContractTime(long contractTime) {
		if (this.contractTime != contractTime) {
			this.contractTime = contractTime;
			setUpdateOption();
		}
	}
}